package com.copsoftware.reportes.geografico.beans;

import java.util.ArrayList;
import java.util.List;

import com.copsoftware.support.json.JSONException;
import com.copsoftware.support.json.JSONObject;

public class BeanTematicoZonal {
//	BeanOcurrencia bnOcurrencia;
	
	public static final String STROKE_COLOR="1";
	public static final String FILL_COLOR="2";
	public static final String STROKE_WEIGTH="3";
	public static final String STROKE_OPACITY="4";
	public static final String FILL_OPACITY="5";
	
	String color;
	String fondo;
	String grosor;
	String strokeOpacity;
	String fillOpacity;
	
	String rangoMin;

	String rangoMax;

	String XRango;
	
//	public BeanTematicoZonal() {
//		bnOcurrencia = new BeanOcurrencia();
//	}
//
//	public BeanOcurrencia getBnOcurrencia() {
//		return bnOcurrencia;
//	}
//
//	public void setBnOcurrencia(BeanOcurrencia bnOcurrencia) {
//		this.bnOcurrencia = bnOcurrencia;
//	}

	public String getColor() {
		return color;
	}

	public void setColor(String color) {
		this.color = color;
	}

	public String getFondo() {
		return fondo;
	}

	public void setFondo(String fondo) {
		this.fondo = fondo;
	}

	public String getGrosor() {
		return grosor;
	}

	public void setGrosor(String grosor) {
		this.grosor = grosor;
	}

	public String getFillOpacity() {
		return fillOpacity;
	}

	public void setFillOpacity(String fillOpacity) {
		this.fillOpacity = fillOpacity;
	}

	public String getStrokeOpacity() {
		return strokeOpacity;
	}

	public void setStrokeOpacity(String strokeOpacity) {
		this.strokeOpacity = strokeOpacity;
	}
	
	public String getRangoMax() {
		return rangoMax;
	}

	public void setRangoMax(String rangoMax) {
		this.rangoMax = rangoMax;
	}

	public String getRangoMin() {
		return rangoMin;
	}

	public void setRangoMin(String rangoMin) {
		this.rangoMin = rangoMin;
	}

	public String getXRango() {
		if (XRango!=null)return XRango;
		return rangoMin+"-"+rangoMax;
	}

	public void setXRango(String rango) {
		XRango = rango;
	}

	public static List crearBeanTematicoZonal(String[] listaJSONObjects) {
		List listJSONObjects = new ArrayList();
		for (int i = 0; i < listaJSONObjects.length; i++) {
			String jsonStringObject = listaJSONObjects[i];
			try {
				JSONObject jsonObject = new JSONObject(jsonStringObject);
				listJSONObjects.add(jsonObject);
			} catch (JSONException e) {
				e.printStackTrace();
			}
		}
		return listJSONObjects;
	}
	
}
